from .models import User


def fontuser(request):
    context = {}
    user_id = request.session.get('user_id')
    if user_id:
        try:
            user = User.objects.get(pk=user_id)
            context.update({'front_user': user})
        except:
            context.update({'front_user': None})
    else:
        context.update({'front_user': None})
    return context
